//////////////////////////////////////////////////////////////////////////////
//                                                                          //
//     Filename: LMRXMLTranslator.h                                         //
//  Create date: February 15, 2005                                          //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////
//                                                                          //
//  Description: This file describes the LMRXMLTranslator class. This class //
//                is a protocol translator that translates from the RTG     //
//                Let Em Ride protocol to XML and back.                     //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////
//       Copyright (c) 2005 - Realtime Gaming.  All rights reserved.        //
//////////////////////////////////////////////////////////////////////////////

#ifndef __LMR_XML_TRANSLATOR__
#define __LMR_XML_TRANSLATOR__

#include "XMLTranslator.h"

//////////////////////////////////////////////////////////////////////////////
// LMRXMLTranslator Class
//////////////////////////////////////////////////////////////////////////////
class LMRXMLTranslator : public XMLTranslator
{
public:
    LMRXMLTranslator( Server* pServer, Connection* pParent );
    virtual ~LMRXMLTranslator();

    // Public Interface
    virtual bool8  TranslateIncomingMessage( uint8* pGameInBuff,  uint32 nGameInBuffSize, uint8* pBuff, uint32 nOutBuffSize );
    virtual uint32 TranslateOutgoingMessage( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize, uint32 nTotalGameBytes );

protected:
	// Incoming
	bool8 TranslateInLogin   ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	bool8 TranslateInDeal    ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	bool8 TranslateInContinue( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	bool8 TranslateInRaise   ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	bool8 TranslateInJackpot ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );

	// Outgoing
	bool8 TranslateOutLogin   ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	bool8 TranslateOutDeal    ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	bool8 TranslateOutT1Done  ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	bool8 TranslateOutJackpot ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	bool8 TranslateOutFinished( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	bool8 TranslateOutError   ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );

};

#endif // #ifndef __LMR_XML_TRANSLATOR__